// GlobalHikCameraPlayer.less
.player-container {
  .ant-card-head {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    min-height: 56px;
  }

  .ant-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 56px);
    overflow: hidden;
  }

  .player-header {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: move;
    user-select: none;

    .header-icon {
      font-size: 18px;
      color: #1890ff;
      margin-right: 4px;
    }

    .header-title {
      font-size: 16px;
      font-weight: 500;
      color: #262626;
      margin-right: 4px;
    }

    .layout-info {
      color: #8c8c8c;
      font-size: 13px;
      margin-left: 4px;
    }
  }

  .player-actions {
    cursor: default;
    display: flex;
    align-items: center;

    .action-divider {
      color: #d9d9d9;
      margin: 0 4px;
    }

    .ant-btn {
      margin: 0;
    }

    .close-btn {
      margin-left: 8px;
      padding: 4px 8px;
      
      &:hover {
        background-color: #f5f5f5;
      }
    }
  }
}

// 窗口网格指示器
.windows-grid {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 4px;
  background: #fafafa;

  .play-window-indicator {
    position: relative;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    padding: 4px 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 50px;

    &:hover {
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }

    &.selected {
      border-color: #1890ff;
      background: #e6f7ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }

    &.playing {
      border-color: #52c41a;
      background: #f6ffed;

      &.selected {
        background: #e6f7ff;
      }
    }

    &.empty {
      background: #fafafa;
      color: #999;
    }

    .window-indicator-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      font-size: 12px;

      .window-title {
        font-weight: 500;
        color: #333;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
      }

      .playing-badge {
        background: #52c41a;
        color: #fff;
        padding: 2px 6px;
        border-radius: 2px;
        font-size: 10px;
        margin-left: 4px;
      }
    }

    .selection-indicator {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: #1890ff;
    }
  }
}

// 窗口状态栏
.windows-status-bar {
  display: flex;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;

  .status-title {
    font-size: 14px;
    color: #666;
    margin-right: 12px;
    font-weight: 500;
  }

  .window-indicators {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;

    .window-indicator {
      position: relative;
      width: 32px;
      height: 32px;
      border: 1px solid #d9d9d9;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s;
      background: #fff;
      font-size: 12px;
      font-weight: 500;
      color: #666;

      &:hover {
        border-color: #1890ff;
        color: #1890ff;
      }

      &.selected {
        border-color: #1890ff;
        background: #e6f7ff;
        color: #1890ff;
      }

      &.playing {
        border-color: #52c41a;
        background: #f6ffed;
        color: #52c41a;

        &.selected {
          background: #e6f7ff;
          color: #1890ff;
        }
      }

      &.empty {
        background: #fafafa;
        color: #999;
      }

      .status-dot {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 6px;
        height: 6px;
        background: #52c41a;
        border-radius: 50%;
        border: 1px solid #fff;
      }
    }
  }
}

// 拖动时的样式
.react-draggable-dragging {
  .player-container {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
}

#multi_hik_camera_player {
  width: 100%;
  height: 90%;
}